<?php

class gDispatcher extends gKernel implements gDispatcherStructure
{
    private $objectsStore = array();

    /**
     *
     * @param <type> $objname
     */
    public function loadObject($objname)
    {
        if( !array_key_exists($objname, $this->objectsStore))
        {
            $filename = "object.".$objname.".php";
            if( !file_exists($filename))
            {
                throw new gException("Cannot find kernel object '$objname'");
                return false;
            }
            $classname = "g".$objname;
            include_once $filename;
            $this->objectsStore[$objname] = new $classname($this->core);
        }
       
    }

    function __call()
    {

    }

    function __get()
    {
        
    }

    public function loadByInterface()
    {
        
    }

    public function setStateCaller()
    {
        
    }

    public function getDispatchTrace()
    {
        
    }

    public function refreshObject()
    {
        
    }

    public function refreshTree()
    {
        
    }

    public function treeWalk()
    {
        
    }
    
}